<!DOCTYPE html>
<html>
    <head>
        <script>
            function replaceDoc()
            {
                window.location.replace("file:///c:Users/pc117/Desktop/document对象.html")
            }
        </script>
    </head>
    <body>
        <input type="button" value="载入新文档替换当前页面" onclick="replaceDoc()">
    </body>
   
</html>